from django.db import models

# 管理员表
class user(models.Model):
    id = models.AutoField(primary_key=True) # ID，自动增长
    username = models.CharField(max_length=50)
    passwd = models.CharField(max_length=50)


# 学生信息表
class stu_info(models.Model):
    id = models.AutoField(primary_key=True)  # ID，自动增长
    stu_num = models.IntegerField()  #学号
    stu_name = models.CharField(max_length=20)  #姓名
    stu_birth = models.DateTimeField()  #出生日期
    stu_add = models.CharField(max_length=100)  #家庭地址


# 课程信息表
class course_info(models.Model):
    c_id = models.AutoField(primary_key=True)   #课程编号
    c_name = models.CharField(max_length=20)    #课程名称
    c_discript = models.CharField(max_length=20)    #课程描述
    c_teacher = models.CharField(max_length=20) #授课教师


# 成绩信息表
class score_info(models.Model):
    id = models.AutoField(primary_key=True)
    stu_num = models.IntegerField() #学号
    c_id = models.IntegerField()    #课程编号
    s_score = models.FloatField()   #分数
